<template>
  <el-input v-model.number="model" :clearable="option.clearable || true" :maxlength="option.maxlength || '30'" :placeholder="option.placeholder || '请输入'" :style="{ width: option.width || '350px'}" />
</template>
<script>
export default {
  name: "iv-num-input",
  props: {
    value: {
      type: Number
    },
    option: {
      type: Object,
      default: () => {}
    }
  },
  computed: {
    model: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("update:value", val);
      }
    }
  }
};
</script>
